const C1Name="xxx"
const C1Password="xxxx"

Set wins=createobject("shell.application")
Set WshShell = WScript.CreateObject("WScript.Shell")

sub LogonEnv()
	Set ie =WScript.CreateObject("InternetExplorer.Application")
	ie.Visible=true
	ie.navigate "https://xxxx/logon.jsp"
	dim cnt
	While ie.Busy Or ie.ReadyState <> 4
		WScript.Sleep 200 : cnt=cnt+1
		if cnt > 100 then 
			ie.quit : msgbox "IE loading too long,Please log manaualy to check this env status" : Wscript.quit
		end if
	wend
	on error resume next : ie.Document.getElementById("overridelink").click : on error goto 0
	Do While ie.Busy Or ie.ReadyState <> 4: WScript.Sleep 200: Loop
	Set inps = ie.Document.getElementsByTagName("input")
	If Not(inps Is Nothing) Then 
		for each item in inps
			if item.name = "username" then item.value = C1Name
			if item.name = "password" then item.value = C1Password
			if item.value = "Login" then item.click
		next
	End If	
	on error goto 0
end sub
LogonEnv